/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.osgc.rf.np.url.util;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Category;

import com.osgc.rf.np.url.util.base.ParamList;
import com.osgc.rf.np.url.util.engin.SessionHelper;

/**
 *
 * @author fxt
 */
public class Base {
	protected Category logger = Category.getInstance(Base.class);
    private BaseController model;
    protected ParamList  params;
    protected HttpServletRequest req;
    protected HttpServletResponse resp;
    protected SessionHelper sessionHelper;
  
    final public void forwradPage(String url){
    	model.forwradPage(url);
    	
    }
    final public void init(BaseController model) throws Exception {
        this.model = model;
        this.params = model.params;
        this.req = model.req;
        this.resp = model.resp;
        this.sessionHelper = model.sessionHelper;
        beforeInvoke();
    }

    protected void beforeInvoke() throws Exception {
    }

    protected void afterInvoke() throws Exception {
    }

    final public void end() throws Exception {
        afterInvoke();
    }

    public void setRedirect(String redirect) {
        model.setRedirect(redirect);
    }
}
